package com.mephi.interfaces;

import com.mephi.exception.NoSuchElementException;
import com.mephi.model.Move;

/**
 * This interface contains set of available operations on list of games on Profile.
 * 
 * @author mephisto
 * @see SimpleProfile
 * 1.0 2011-05-26
 */
public interface GameList
{
	/**
	 * 
	 * @param game the game to add
	 * @throws IllegalArgumentException if id of the game is lower than zero 
	 * 		   <code>id < 0</code>
	 */
	void add(Game<Move> game) throws IllegalArgumentException;
	
	/**
	 * 
	 * @param id the id of Game to remove
	 * 
	 * @throws NoSuchElementException if Game at index id does not exist
	 * @throws IllegalArgumentException if id of the game is lower than zero 
	 * 		   <code>id < 0</code>
	 */
	void remove(int id) throws NoSuchElementException, IllegalArgumentException;
	
	/**
	 * 
	 * @param id the id of the game
	 * @return the Game at id
	 * 
	 * @throws NoSuchElementException if Game at index id does not exist
	 * @throws IllegalArgumentException if id of the game is lower than zero 
	 * 		   <code>id < 0</code>
	 */
	Game<Move> getGame(int id) throws NoSuchElementException, IllegalArgumentException;
}
